package com.youi.shop.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.youi.shop.pojo.entity.OrderItem;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 订单项表 Mapper 接口
 * </p>
 *
 * @author xxf
 * @since 2020-11-09
 */
@Mapper
@Repository
public interface OrderItemMapper extends BaseMapper<OrderItem> {

    /**
     * 批量插入订单项
     * @param list
     */
    void insertBatch(@Param("list") List<OrderItem> list);

    /**
     * 根据订单id查询多条订单项
     * @param orderId
     * @return
     */
    List<OrderItem> selectByOrderId(Long orderId);
}
